#!/usr/bin/env bash

OPTS_MEM="-server -Xms512m -Xmx4096m"
OPTS_GC="-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:./logs/gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./logs/heapdump.hprof"
OPTS_EXT="-Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8"
OPTS_JMX="-Dcom.sun.management.jmxremote -Djava.rmi.server.hostname='192.168.56.101' -Dcom.sun.management.jmxremote.port=8383 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
OPTS_JAVA="$OPTS_MEM $OPTS_GC $OPTS_EXT $OPTS_JMX"

java $OPTS_JAVA -jar test-servlet-container-1.0.0.jar